package com.myrslok.set;

import com.myrslok.util.FileUtil;
import org.jetbrains.annotations.NotNull;

public class CopyFileAction implements ResourceSet.ResourceAction<FileToFileResource> {

    private static final CopyFileAction instance = new CopyFileAction();

    public static CopyFileAction getInstance() {
        return instance;
    }

    @Override
    public void run(@NotNull final FileToFileResource r) {
        FileUtil.copyFile(r.getSource(), r.getTarget());
    }
}
